Skip to content

Conversation

romtsn
Copy link
Member

@romtsn romtsn commented Oct 10, 2025

#skip-changelog

📜 Description

Useful to test Session Replay, e.g. for this issue: #3560

💡 Motivation and Context

💚 How did you test it?

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

builder.setInstantAppsEnabled(true);

CustomTabsIntent customTabsIntent = builder.build();
customTabsIntent.launchUrl(this, Uri.parse(DEMO_URL));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential bug: The call to customTabsIntent.launchUrl() is not wrapped in a try-catch block, which will cause a crash if no suitable browser is found.
  • Description: The call to customTabsIntent.launchUrl() is not wrapped in a try-catch block to handle ActivityNotFoundException. This exception will be thrown, causing the app to crash, under a few conditions. On devices running Android 11 (API 30) or newer, the crash will occur because the AndroidManifest.xml file is missing the required <queries> element, which prevents the app from discovering installed browsers. The crash can also happen on any Android version if the device has no browser installed or if the installed browsers do not support Custom Tabs. Past Sentry issues (1, 2) confirm ActivityNotFoundException is a recurring problem.

  • Suggested fix: Wrap the customTabsIntent.launchUrl() call in a try-catch block to handle ActivityNotFoundException. In the catch block, you can fall back to a standard ACTION_VIEW intent or show an error message. Additionally, add the appropriate <queries> element to AndroidManifest.xml to ensure browser visibility on Android 11+ devices.
    severity: 0.85, confidence: 0.95

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Contributor

github-actions bot commented Oct 10, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 358.55 ms 417.93 ms 59.38 ms
Size 1.58 MiB 2.11 MiB 539.70 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
23d6b12 354.10 ms 408.38 ms 54.28 ms
9fbb112 361.43 ms 427.57 ms 66.14 ms
1df7eb6 397.04 ms 429.64 ms 32.60 ms
c8125f3 397.65 ms 485.14 ms 87.49 ms
ee747ae 358.21 ms 389.41 ms 31.20 ms
b750b96 408.98 ms 480.32 ms 71.34 ms
f634d01 359.58 ms 433.88 ms 74.30 ms
806307f 357.85 ms 424.64 ms 66.79 ms
ee747ae 374.71 ms 455.18 ms 80.47 ms
ce0a49e 532.00 ms 609.96 ms 77.96 ms

App size

Revision Plain With Sentry Diff
23d6b12 1.58 MiB 2.10 MiB 532.31 KiB
9fbb112 1.58 MiB 2.11 MiB 539.18 KiB
1df7eb6 1.58 MiB 2.10 MiB 532.97 KiB
c8125f3 1.58 MiB 2.10 MiB 532.32 KiB
ee747ae 1.58 MiB 2.10 MiB 530.95 KiB
b750b96 1.58 MiB 2.10 MiB 533.19 KiB
f634d01 1.58 MiB 2.10 MiB 533.40 KiB
806307f 1.58 MiB 2.10 MiB 533.42 KiB
ee747ae 1.58 MiB 2.10 MiB 530.95 KiB
ce0a49e 1.58 MiB 2.10 MiB 532.94 KiB

Previous results on branch: rz/chore/custom-tabs-sample

Startup times

Revision Plain With Sentry Diff
830ccec 404.73 ms 466.37 ms 61.64 ms

App size

Revision Plain With Sentry Diff
830ccec 1.58 MiB 2.11 MiB 539.18 KiB

@romtsn romtsn enabled auto-merge (squash) October 16, 2025 09:05
@romtsn romtsn merged commit b23af9e into main Oct 16, 2025
61 checks passed
@romtsn romtsn deleted the rz/chore/custom-tabs-sample branch October 16, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants